<include file="Public/header" />
<title>添加账册</title>
</head>
<body>
<div class="pd-20">
<form class="" name="postForm" id="postForm" action="__URL__/index/"  enctype="multipart/form-data" method="post">
	<table class="table table-border table-bordered table-bg">
		<input type="hidden" name="id" class="input-text" value="<{$detail.id}>">
		<tbody>
			<tr class="text-c">
				<td width="15%" class="text-r" style="background-color:#f5f5f5">费用</td>
				<td class="text-l" width="35%">
					<input type="text" name="fee" class="input-text" value="<{$detail.fee}>" >
				</td>
				<td width="15%" class="text-r" style="background-color:#f5f5f5">运单号</td>
				<td class="text-l" width="35%">
					<input type="text" name="mail_no" class="input-text" value="<{$detail.mail_no}>" >
				</td>				
			</tr>
			<tr class="text-c">
				<td width="15%" class="text-r" style="background-color:#f5f5f5">订单号</td>
				<td class="text-l" width="35%">
					<input type="text" name="order_no" class="input-text" value="<{$detail.order_no}>" >
				</td>
				<td width="15%" class="text-r" style="background-color:#f5f5f5">费用类型</td>
				<td class="text-l" width="35%">
					<select name="cate" class="select input-text" style="width:150px;float:left;margin-right:5px;">
						<option value="0">---请选择---</option>
						<option value="1"<if condition="$detail['cate'] eq 1">selected</if> >充值</option>
						<option value="2"<if condition="$detail['cate'] eq 2">selected</if> >扣费</option>
					</select>
				</td>
			</tr>
		</tbody>
	</table>
	<input type="button" class="btn btn-primary radius mt" id="b_add" value="更新">
</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/jquery.form.js"></script>
<script type="text/javascript">
    $(function(){
		/*保存计划入库单数据*/
		$("#b_add").click(function() { 
	        $("#postForm").ajaxSubmit({  
	            url: "<{:U('confirm_edit')}>",
	            type : "post",
	            dataType : 'json',  
	            success : function(data) {
					if(data.status==1){
						layer.msg(data.info,function(){
							parent.window.location.href =parent.window.location.href;
						});
					}else{
						layer.msg(data.info);
					}
	                
	            },  
	            error : function(data) {  
	                layer.msg('出错');
	            }  
	        });  
	    });

    })
</script>
</body>
</html>